package com.liehacker.android.util;

import android.util.Log;


/**
 * 
 * 함수 속도 체크용 클래스 
 * @author liehacker
 *
 */
public class Profiler {
	private long currentTime;
	private String tag;
	private String message;

	public Profiler(String tag, String message) {
		this.tag = tag;
		this.message = message;
		restart(message);
	}
	
	public void restart(String message) {
		currentTime = System.currentTimeMillis();
		this.message = message;
		Log.d(tag, message+" started");
	}
	
	public void stop() {
		Log.d(tag, "Elapsed Time for "+message+" = "+(System.currentTimeMillis()-currentTime));			
	}
}